<template>
  <avue-crud ref="crud"
             :data="data"
             :option="option"
             @row-dblclick="handleRowDBLClick"></avue-crud>
</template>
<script>
export default {
  data () {
    return {
      data: [
        {
          name: '张三',
          sex: '男'
        }, {
          name: '李四',
          sex: '女'
        }
      ],
      option: {
        menu: false,
        dialogType: 'drawer',
        dialogWidth: 800,
        column: [
          {
            label: '姓名',
            prop: 'name'
          }, {
            label: '性别',
            prop: 'sex'
          }
        ]
      }
    }
  },
  methods: {
    handleRowDBLClick (row, event) {
      this.$refs.crud.rowEdit(row, row.$index);
    },
  }
}
</script>